package activity.personal;

import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.itboye.hutoubenjg.R;

import activity.login.WelcomeActivity;
import activity.login.XieYiActivity;
import base.BaseActivity;


/**
 * 关于虎头本
 */
public class AboutActivity extends BaseActivity {
    TextView tvTitle;
    TextView version_tv, sina_num, WX_num, phone_num,guide_xieyi,guide_tv;
    ImageView back;
    LinearLayout huanyingye;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
        tvTitle.setText("关于我们");

        try {
            // 获取packagemanager的实例
            PackageManager packageManager = getPackageManager();
            // getPackageName()是你当前类的包名，0代表是获取版本信息
            PackageInfo packInfo = packageManager.getPackageInfo(getPackageName(),0);
            String version = packInfo.versionName;

            version_tv.setText("版本号v"+version);
        } catch (Exception e) {
        }
    }

    @Override
    protected void onInit() {

    }

    @Override
    protected void onReadIntent(Bundle bundle) {

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.guide_tv:
                Intent intent=new Intent(this,WelcomeActivity.class);
                intent.putExtra("isAbout",true);
                startActivity(intent);
                break;
            case R.id.guide_xieyi:
                Intent intent01=new Intent(this,XieYiActivity.class);
                startActivity(intent01);
                break;
        }
    }
}
